﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DrawAGraph
{
    internal class ShapeFactory
    {
        public static Shape CreateShape(string shapeType, Color color)
        {
            IShapeFactory factory = new CreateShapeFactory(color);
            
            switch (shapeType)
            {
                case "Circle":
                    return factory.CircleCreator();
                case "Rectangle":
                    return factory.RectangleCreator();
                case "Triangle":
                    return factory.TriangleCreator();
                case "Ellipse":
                    return factory.EllipseCreator();
                default:
                    return null;
            }
        }
    }
}
